package com.community.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * (Community)表实体类
 *
 * @author makejava
 * @since 2021-09-27 16:45:30
 */
@SuppressWarnings("serial")
public class Community extends Model<Community> {

    //id
    @TableId(value = "id", type = IdType.INPUT) //这种方式是主键手动输入
    private Long id;
    //小区编号
    private String communityNo;
    //小区名称
    private String communityName;
    //坐落地址
    private String address;
    //占地面积
    private Long area;
    //总栋数
    private Long dong;
    //总户数
    private Long familyNum;
    //绿化率
    private Long afforest;
    //开发商名称
    private String developers;
    //物业公司名称
    private String property;
    //状态 1：启用 2：停用
    private Long state;
    //缩略图url地址
    private String filePath;
    //创建者
    private Long createId;
    //创建时间
/*    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")*/
    private Date createDate;
    //更新者
    private Long modifyId;
    //更新时间
    private Date modifyDate;

    @TableField(exist = false)
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date beginDate;
    @TableField(exist = false)
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date overDate;

    public Date getBeginDate() {
        return beginDate;
    }

    public void setBeginDate(Date beginDate) {
        this.beginDate = beginDate;
    }

    public Date getOverDate() {
        return overDate;
    }

    public void setOverDate(Date overDate) {
        this.overDate = overDate;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getCommunityNo() {
        return communityNo;
    }

    public void setCommunityNo(String communityNo) {
        this.communityNo = communityNo;
    }

    public String getCommunityName() {
        return communityName;
    }

    public void setCommunityName(String communityName) {
        this.communityName = communityName;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public Long getArea() {
        return area;
    }

    public void setArea(Long area) {
        this.area = area;
    }

    public Long getDong() {
        return dong;
    }

    public void setDong(Long dong) {
        this.dong = dong;
    }

    public Long getFamilyNum() {
        return familyNum;
    }

    public void setFamilyNum(Long familyNum) {
        this.familyNum = familyNum;
    }

    public Long getAfforest() {
        return afforest;
    }

    public void setAfforest(Long afforest) {
        this.afforest = afforest;
    }

    public String getDevelopers() {
        return developers;
    }

    public void setDevelopers(String developers) {
        this.developers = developers;
    }

    public String getProperty() {
        return property;
    }

    public void setProperty(String property) {
        this.property = property;
    }

    public Long getState() {
        return state;
    }

    public void setState(Long state) {
        this.state = state;
    }

    public String getFilePath() {
        return filePath;
    }

    public void setFilePath(String filePath) {
        this.filePath = filePath;
    }

    public Long getCreateId() {
        return createId;
    }

    public void setCreateId(Long createId) {
        this.createId = createId;
    }

    public Date getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    public Long getModifyId() {
        return modifyId;
    }

    public void setModifyId(Long modifyId) {
        this.modifyId = modifyId;
    }

    public Date getModifyDate() {
        return modifyDate;
    }

    public void setModifyDate(Date modifyDate) {
        this.modifyDate = modifyDate;
    }

    /**
     * 获取主键值
     *
     * @return 主键值
     */
    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "Community{" +
                "id=" + id +
                ", communityNo='" + communityNo + '\'' +
                ", communityName='" + communityName + '\'' +
                ", address='" + address + '\'' +
                ", area=" + area +
                ", dong=" + dong +
                ", familyNum=" + familyNum +
                ", afforest=" + afforest +
                ", developers='" + developers + '\'' +
                ", property='" + property + '\'' +
                ", state=" + state +
                ", filePath='" + filePath + '\'' +
                ", createId=" + createId +
                ", createDate=" + createDate +
                ", modifyId=" + modifyId +
                ", modifyDate=" + modifyDate +
                ", beginDate=" + beginDate +
                ", overDate=" + overDate +
                '}';
    }
}



